<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>商品上传表单</title>
    <link rel="stylesheet" href="css/a.css">
    <style></style>
</head>
<body>
<div class="form-container">
    <form id="goodsForm" action="products/upload" method="post" enctype="multipart/form-data">
        <!-- 商品名 -->
        <div class="form-group">
            <label for="goodsName">商品名称</label>
            <input type="text" name="goodsName" placeholder="请输入商品名称" id="goodsName" required>
            <div class="error-message" id="nameError"></div>
        </div>

        <!-- 商品图片上传 -->
        <div class="form-group">
            <label>商品图片（可多选）</label>
            <div class="file-upload">
                <div class="file-custom" id="fileLabel">
                    <span>点击选择图片或拖拽到此处</span>
                    <div id="fileNames"></div>
                </div>
                <input type="file" name="goodsImg" id="goodsImg" accept="image/*" multiple>
            </div>
            <div class="error-message" id="fileError"></div>
        </div>

        <!-- 价格组 -->
        <div class="form-row">
            <div class="form-group">
                <label for="goodsPrice">商品单价（元）</label>
                <input type="number" name="goodsPrice" id="goodsPrice" placeholder="0.00" min="0" step="1" required>
                <div class="error-message" id="priceError"></div>
            </div>

            <div class="form-group">
                <label for="goodsSpecialPrice">特惠价（元）</label>
                <input type="number" name="goodsSpecialPrice" id="goodsSpecialPrice" placeholder="0.00" min="0" step="1">
                <div class="error-message" id="specialPriceError"></div>
            </div>
        </div>

        <!-- 商品描述 -->
        <div class="form-group">
            <label for="goodsDesc">商品描述</label>
            <textarea name="goodsDesc" id="goodsDesc" placeholder="请输入商品详细描述..." rows="4"></textarea>
        </div>

        <!-- 商品库存 -->
        <div class="form-group">
            <label for="goodsStock">商品库存</label>
            <input type="number" name="goodsStock" id="goodsStock" placeholder="0" min="0" step="1" required>
            <div class="error-message" id="stockError"></div>
        </div>

        <!-- 提交按钮 -->
        <button type="submit" class="submit-btn">发布商品</button>
    </form>
</div>

<script src="js/a.js"></script>
<script></script>
</body>
</html>